package com.imooc.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

import java.util.ArrayList;
import java.util.List;

@Configuration
@ComponentScan("com.imooc.bean")
public class MyConfigration {

    @Bean
    public List<String> stringList(){
        List<String> stringList=new ArrayList<>();
        stringList.add("Candy");
        stringList.add("domino");
        return stringList;
    }

    @Bean
    @Order(47)
    public String string1(){
        return "apple";
    }

    @Bean
    @Order(13)
    public String string2(){
        return "banana";
    }

    @Bean("int1")
    public Integer integer1(){
        return 12;
    }

    @Bean
    public Integer integer2(){
        return 47;
    }
}
